import { Dispatch } from "redux";
import { RouteComponentProps } from "react-router-dom";

export interface IHomePageStoreState {
  syncId: string;
  asyncId: string;
}

export interface IHomePageActionsProps {
  dataSync: () => void;
  dataAsync: (parameter: string) => (dispatch: Dispatch) => void;
}

// export interface IHomePageProps extends RouteComponentProps<any>, IHomePageActionsProps {
export interface IHomePageProps extends  IHomePageActionsProps {
  homePage: IHomePageStoreState;
}

// global dir 
export interface IStoreState {
  homePage: IHomePageStoreState;
}


export const mapStateToProps = (state: IStoreState) => {
  const { homePage } = state;
  return {
    homePage,
  };
};